package com.rover.system.entity;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.grid.ViewField;

/**
 * 表单管理
 * 
 */
@Entity
@Table(name = "S_FormTableInfo")
public class FormTableInfo implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@ViewField(header = "编号", width = 100)
	private Integer tableId;
	@ViewField(header = "显示名称", width = 150)
	private String tableName;
	@ViewField(header = "数据表名", width = 150)
	private String physicalName;
	@ViewField(header = "实体名", width = 150)
	private String entityName;
	@ViewField(header = "包名", width = 150)
	private String entityPackage;
	@ViewField(header = "主键策略", width = 100)
	private String generationType;
	@ViewField(header = "主键SEQUENCE:(Oracle序列名)", width = 100)
	private String oracleSequence;
    @ViewField(header = "是否是JS", width = 100)
    private Integer isJS;
	private Set<FormTableField> formTableField=new HashSet<FormTableField>();
	
	
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY) 
	public Integer getTableId() {
		return tableId;
	}
	public void setTableId(Integer tableId) {
		this.tableId = tableId;
	}
	public String getTableName() {
		return tableName;
	}
	public void setTableName(String tableName) {
		this.tableName = tableName;
	}
	public String getPhysicalName() {
		return physicalName;
	}
	public void setPhysicalName(String physicalName) {
		this.physicalName = physicalName;
	}
	public String getEntityName() {
		return entityName;
	}
	public void setEntityName(String entityName) {
		this.entityName = entityName;
	}
	public String getEntityPackage() {
		return entityPackage;
	}
	public void setEntityPackage(String entityPackage) {
		this.entityPackage = entityPackage;
	}
	public String getGenerationType() {
		return generationType;
	}
	public void setGenerationType(String generationType) {
		this.generationType = generationType;
	}
	public String getOracleSequence() {
		return oracleSequence;
	}
	public void setOracleSequence(String oracleSequence) {
		this.oracleSequence = oracleSequence;
	}
	@OneToMany(cascade=CascadeType.ALL,fetch = FetchType.EAGER,mappedBy = "formTableInfo")
	public Set<FormTableField> getFormTableField() {
		return formTableField;
	}
	public void setFormTableField(Set<FormTableField> formTableField) {
		this.formTableField = formTableField;
	}

    public Integer getIsJS() {
        return isJS;
    }

    public void setIsJS(Integer isJS) {
        this.isJS = isJS;
    }
}
